package com.cn.api;


import com.cn.dto.StockTurnoverDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Primary
@FeignClient(value = "stock-client",path = "/api/stockTurnover")
public interface StockTurnoverService {

    @GetMapping(value = "/findAll")
    List<StockTurnoverDTO> findAll(@RequestBody StockTurnoverDTO stockTurnoverDTO);

    @PostMapping(value = "/add")
    int add(@RequestBody StockTurnoverDTO stockTurnoverDTO);

    @DeleteMapping(value = "/delete")
    @ResponseBody
    int delete(@RequestBody StockTurnoverDTO stockTurnoverDTO);

    @PostMapping(value = "/update")
    int update(@RequestBody StockTurnoverDTO stockTurnoverDTO);

    @PostMapping(value = "/findByProductId")
    StockTurnoverDTO findByProductId(@RequestParam int productId);

}
